package com.zb.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zb.entity.ZjWorkSpareMaterial;
import com.zb.extend.WorkSpareMaterialExtend;
import com.zb.vo.WorkTotalFeeVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 工单备件物料表 Mapper 接口
 * </p>
 *
 * @author WEN
 * @since 2023-10-26
 */
@Repository
public interface ZjWorkSpareMaterialMapper extends BaseMapper<ZjWorkSpareMaterial> {

    /**
     * 根据工单ID获取工单配件导出字段数据
     * @param workIds 工单ID
     */
    List<WorkSpareMaterialExtend> getOrderSpareExportFieldByWorkIds(@Param("workIds") List<Long> workIds);

    /**
     * 根据工单ID获取审核通过的配件费用
     * @param workIds 工单ID
     * @return
     */
    List<ZjWorkSpareMaterial> getOrderSettlementFeeByWorkId(@Param("workIds") List<Long> workIds);

    /**
     * 根据工单ID获取工单配件费用
     * @param workId 工单ID
     * @return
     */
    List<WorkSpareMaterialExtend> getByWorkId(@Param("workId") Long workId);
}
